The invention relates to a method for patterning a polymer layer on a support, and more particularly to a method for packaging a microbattery by means of a polymer layer and a barrier layer.